home *** CD-ROM | disk | FTP | other *** search
/ Openstep 4.2 (Developer) / Openstep Developer 4.2.iso / NextDeveloper / OpenStepConversion / IntermediateFrameworks1 / AppKit.framework / Headers / NSFontManager.h < prev    next >
Encoding:
Text File  |  1994-09-29  |  2.9 KB  |  103 lines

  1. /*
  2.     FontManager.h
  3.     Application Kit, Release 2.0
  4.     Copyright (c) 1988, 1989, 1990, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import <Foundation/NSObject.h>
  8. #import "NSGraphics.h"
  9.  
  10. typedef unsigned int NSFontTraitMask;
  11.  
  12. /*
  13.  * Font Traits
  14.  *
  15.  * This list should be kept small since the more traits that are assigned
  16.  * to a given font, the harder it will be to map it to some other family.
  17.  * Some traits are mutually exclusive such as NX_EXPANDED and NX_CONDENSED.
  18.  */
  19.  
  20. #define NSItalicFontMask        0x00000001
  21. #define NSBoldFontMask            0x00000002
  22. #define NSUnboldFontMask        0x00000004
  23. #define NSNonStandardCharacterSetFontMask    0x00000008
  24. #define NSNarrowFontMask        0x00000010
  25. #define NSExpandedFontMask        0x00000020
  26. #define NSCondensedFontMask        0x00000040
  27. #define NSSmallCapsFontMask        0x00000080
  28. #define NSPosterFontMask        0x00000100
  29. #define NSCompressedFontMask        0x00000200
  30. #define NSUnitalicFontMask         0x01000000    /* historical */
  31.  
  32. /* whatToDo values */
  33.  
  34. #define NSNoFontChangeAction        0
  35. #define NSViaPanelFontAction        1
  36. #define NSAddTraitFontAction        2
  37. #define NSSizeUpFontAction        3
  38. #define NSSizeDownFontAction        4
  39. #define NSHeavierFontAction        5
  40. #define NSLighterFontAction        6
  41. #define NSRemoveTraitFontAction        7
  42.  
  43. #define NSAddTraitFontAction        2    /* historical */
  44.  
  45. @interface NSFontManager : NSObject
  46. {
  47.     id                  panel;
  48.     id                  menu;
  49.     SEL                 action;
  50.     int                 whatToDo;
  51.     NSFontTraitMask     traitToChange;
  52.     id                  selFont;
  53.     struct _fmFlags {
  54.     unsigned int        multipleFont:1;
  55.     unsigned int        disabled:1;
  56.     unsigned int        _RESERVED:14;
  57.     }                   fmFlags;
  58.     unsigned short      _lastPos;
  59.     id                delegate;
  60.     unsigned int        _reservedFMint2;
  61.     unsigned int        _reservedFMint3;
  62.     unsigned int        _reservedFMint4;
  63. }
  64.  
  65. + setFontPanelFactory:factoryId;
  66. + setFontManagerFactory:factoryId;
  67. + sharedFontManager;
  68.  
  69. - (BOOL)isMultiple;
  70. - selFont;
  71. - setSelFont:fontObj isMultiple:(BOOL)flag;
  72. - convertFont:fontObj;
  73. - getFontMenu:(BOOL)create;
  74. - getFontPanel:(BOOL)create;
  75. - findFont:(NSString *)family traits:(NSFontTraitMask)traits weight:(int)weight size:(float)size;
  76. - getFamily:(const char **)family traits:(NSFontTraitMask *)traits weight:(int *)weight size:(float *)size ofFont:fontObj;
  77. - (char **)availableFonts;
  78. - convert:fontObj toSize:(float)size;
  79. - convert:fontObj toFace:(NSString *)typeface;
  80. - convert:fontObj toFamily:(NSString *)family;
  81. - convert:fontObj toHaveTrait:(NSFontTraitMask)trait;
  82. - convert:fontObj toNotHaveTrait:(NSFontTraitMask)trait;
  83. - convertWeight:(BOOL)upFlag of:fontObj;
  84. - addFontTrait:sender;
  85. - removeFontTrait:sender;
  86. - modifyFont:sender;
  87. - orderFrontFontPanel:sender;
  88. - modifyFontViaPanel:sender;
  89. - (BOOL)isEnabled;
  90. - setEnabled:(BOOL)flag;
  91. - (SEL)action;
  92. - setAction:(SEL)aSelector;
  93. - finishUnarchiving;
  94. - sendAction;
  95. - setDelegate:anObject;
  96. - delegate;
  97.  
  98. @end
  99.  
  100. @interface NSObject(FontManagerDelegate)
  101. - (BOOL)fontManager:sender willIncludeFont:(NSString *)fontName;
  102. @end
  103.